Skip to content

feat: add configurable pipeline logging#28

Merged
LRainner merged 2 commits into
masterfrom
feat/configurable-logging
Jun 24, 2026
Merged

feat: add configurable pipeline logging#28
LRainner merged 2 commits into
masterfrom
feat/configurable-logging

Conversation

@LRainner

Copy link
Copy Markdown
Owner

Summary

  • add configurable TypeX log level saved in config and exposed in desktop settings
  • add debug pipeline text logs for ASR, plugins, LLM input/output, and final output
  • fix LLM chunk aggregation to avoid inserting spaces between streamed chunks

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces configurable logging levels across the TypeX application, adding a settings UI in the desktop frontend, supporting dynamic log filter reloading in the desktop app, and introducing detailed debug logging for pipeline stages. The review feedback highlights two key improvements: initializing tracing before loading the configuration in the CLI to prevent losing startup logs, and deriving PartialEq and Eq on the new LogLevel enum to facilitate direct comparisons.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread apps/cli/src/main.rs Outdated
Comment on lines +9 to +10
let config = load_config()?;
init_tracing(config.logging.level);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The load_config() function is called before init_tracing(). Since load_config() contains tracing::info! calls to log whether the config was loaded or if the default config is being used, these log messages will be executed before the tracing subscriber is initialized. As a result, these startup logs will be completely lost and won't appear in the console.

To fix this, you can check if the config file exists and log the status in main immediately after init_tracing is initialized. You should also remove the tracing::info! calls from inside load_config() to keep the code clean.

Suggested change
let config = load_config()?;
init_tracing(config.logging.level);
let config_path = std::path::Path::new("config.toml");
let config_exists = config_path.exists();
let config = load_config()?;
init_tracing(config.logging.level);
if config_exists {
tracing::info!("loaded config from {}", config_path.display());
} else {
tracing::info!("using default config");
}

Comment thread crates/config/src/lib.rs Outdated
pub level: LogLevel,
}

#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize)]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The LogLevel enum is a simple configuration enum. It is highly recommended to derive PartialEq and Eq for such enums to allow direct comparison and equality checks in tests or other parts of the codebase without needing to convert them to strings first.

Suggested change
#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize)]
#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize, PartialEq, Eq)]

Co-Authored-By: Claude <noreply@anthropic.com>
@LRainner

Copy link
Copy Markdown
Owner Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces configurable and dynamic logging levels across the TypeX application. It adds a new logging configuration section to AppConfig with levels ranging from Error to Trace, exposes this setting in the desktop frontend UI with localized strings, and implements dynamic log level reloading in the desktop app using tracing_subscriber::reload. Additionally, it integrates detailed debug-level tracing throughout the text processing pipeline stages (ASR, plugins, LLM, and final output). There are no review comments to evaluate, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@LRainner LRainner merged commit d1ffdd2 into master Jun 24, 2026
7 checks passed
@LRainner LRainner deleted the feat/configurable-logging branch June 24, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant